package org.jeecg.config.sms;

import org.jeecg.common.util.sms.AliYunUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AliYunConfig {
    @Value("${jeecg.aliyun.accessKeyId}")
    private String accessKeyId;
    @Value("${jeecg.aliyun.accessKeySecret}")
    private String accessKeySecret;
    @Value("${jeecg.aliyun.endPoint}")
    private String endPoint;

    @Bean
    public void initAliYunConfig() {
        AliYunUtil.setAccessKeyId(accessKeyId);
        AliYunUtil.setAccessKeySecret(accessKeySecret);
        AliYunUtil.setEndPoint(endPoint);
    }
}
